package org.nf.shopping.service.Impl;

import com.github.pagehelper.PageInfo;
import lombok.RequiredArgsConstructor;
import org.nf.shopping.entity.Assemble;
import org.nf.shopping.mapper.AdminMapper;
import org.nf.shopping.mapper.AssembleMapper;
import org.nf.shopping.service.AssembleService;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * @Author czl
 * @Date 2024-12-08
 */
@Service
@RequiredArgsConstructor
public class AssembleServiceImpl implements AssembleService {
    private final AssembleMapper assembleMapper;
    @Override
    public PageInfo<Assemble> listAssemble(Integer pageSize, Integer pageNum, String name) {
        List<Assemble> list =assembleMapper.listAssemble(pageSize,pageNum,name);
        PageInfo<Assemble> pageInfo =new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public void updateAssemble(Assemble assemble) {
        assembleMapper.updateAssemble(assemble);
    }

    @Override
    public void deloneAssemble(Integer id) {
        assembleMapper.deloneAssemble(id);
    }

    @Override
    public void addAssemble(Assemble assemble) {
        assembleMapper.addAssemble(assemble);
    }

    @Override
    public List<Assemble> getAssembleList() {
        return assembleMapper.getAssembleList();
    }
}
